<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
  <title>用户详情</title>
  <div th:replace="common/link::header"></div>
</head>
<body>
<div class="layui-fluid">
  <div class="layui-row">
    <div class="layui-form" lay-filter="user_form" id="user_form">
      <input type="hidden" name="id" id="id">
        <div class="layui-form-item">
          <label class="layui-form-label">用户昵称</label>
          <div class="layui-input-inline">
            <input type="text" class="layui-input" name="nickName" disabled="disabled"/>
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">用户头像</label>
          <div class="layui-input-inline">
            <img class="layui-upload-img" onclick="fun.preview(this)" id="upload-img" width="100px" height="100px" src="/static/img/def_profile.jpg">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">性别</label>
          <div class="layui-input-inline">
            <input type="text" class="layui-input" name="genderLabel" disabled="disabled"/>
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">生日</label>
          <div class="layui-input-inline">
            <input type="text" class="layui-input" name="birthday" disabled="disabled"/>
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">手机号</label>
          <div class="layui-input-inline">
            <input type="text" class="layui-input" name="mobile" disabled="disabled"/>
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">邮箱</label>
          <div class="layui-input-inline">
            <input type="text" class="layui-input" name="email" disabled="disabled"/>
          </div>
        </div>
    </div>
  </div>
</div>
<div th:replace="common/script::footer"></div>
<script th:inline="javascript">
  layui.config({
      base: '/static/layuiadmin/' //静态资源所在路径
  }).extend({
     index: 'lib/index', //主入口模块
  }).use(['index', 'form','crud'], function(){
    let $ = layui.$,
            form = layui.form,
            crud = layui.crud,
            user = [[${user}]];
    $('#upload-img').attr('src', user.avatar);
    form.val('user_form',user);
  });
</script>
</body>
</html>